Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix opencv-python handling to avoid conflict #461

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Maslino
Copy link

@Maslino Maslino commented Aug 15, 2024

There are four opencv python packages:

  • opencv-python
  • opencv-contrib-python
  • opencv-python-headless
  • opencv-contrib-python-headless

Only one of them should be installed otherwise there would have conflict.

The code line

if 'opencv-python' in packages() or 'opencv-python-headless' in packages():

only consider opencv-python and opencv-python-headless and the other two are not considered. The above line is also not neccessary because if opencv package was not installed, an ImportError exception would be thrown.

This PR tries to fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant